home *** CD-ROM | disk | FTP | other *** search
/ Adephia Powerlink / AdephiaPowerlink-030102.iso / pc / Install / WorkFlow / Gui / CmnCtrls.swf / scripts / DefineButton2_27 / BUTTONCONDACTION on(keyPress Tab).as
Encoding:
Text File  |  2002-04-02  |  821 b   |  37 lines

  1. on(keyPress "<Tab>"){
  2.    nSize = TabOrderList.length;
  3.    if(nSize < 1)
  4.    {
  5.       return undefined;
  6.    }
  7.    nCounter = 0;
  8.    while(nCounter < nSize)
  9.    {
  10.       if(currentSelection eq TabOrderList[nCounter])
  11.       {
  12.          if(Key.isDown(Key.SHIFT))
  13.          {
  14.             if(nCounter == 0)
  15.             {
  16.                SetAbsoluteTabFocus(nSize - 1,nSize,-1);
  17.             }
  18.             else
  19.             {
  20.                SetAbsoluteTabFocus(nCounter - 1,nSize,-1);
  21.             }
  22.          }
  23.          else if(nCounter == nSize - 1)
  24.          {
  25.             SetAbsoluteTabFocus(0,nSize,1);
  26.          }
  27.          else
  28.          {
  29.             SetAbsoluteTabFocus(nCounter + 1,nSize,1);
  30.          }
  31.          return undefined;
  32.       }
  33.       nCounter += 1;
  34.    }
  35.    SetAbsoluteTabFocus(0,nSize,1);
  36. }
  37.